﻿@namespace SwashbucklerDiary.Components
@inherits MyComponentBase

<MHover>
    <MCard @attributes="context.Attrs"
           Class="@($"mb-5 my-tag-card {(context.Hover?"elevation-sm-2":"")}")"
           Elevation="0"
           Ripple="false"
           Rounded="@("lg")"
    @oncontextmenu="()=>ShowMenu=true"
           OnClick="()=>OnClick.InvokeAsync(Value)">
        <MListItem>
            <MListItemIcon>
                <MIcon>
                    mdi-label-outline
                </MIcon>
            </MListItemIcon>

            <MListItemContent>
                @(Value!.Name)
            </MListItemContent>

            <MListItemAction>
                <div @onclick:stopPropagation="true">
                    <MultiMenu @bind-Value="ShowMenu"
                               ListItemModels="ListItemModels">
                        <ButtonContent>
                            <MIcon>mdi-pencil</MIcon>
                        </ButtonContent>
                    </MultiMenu>
                </div>
            </MListItemAction>
        </MListItem>
    </MCard>
</MHover>